﻿#include "dtumanager.h"
#include <QHostAddress>
#include <ctime>

DTUManager::DTUManager()
{
    for(int i=0;i<4;i++)
    {
        charts[i] = new Chart();
        charts[i]->legend()->hide();
    }
}

void DTUManager::slotDTUUpdate(int idx, int data)
{
    charts[idx]->updateChart(data);
    emit sigShowData(idx, data);
}

DTUManager::~DTUManager()
{
    for(int i=0;i<4;i++)
        delete charts[i];
}

Chart* DTUManager::getChart(size_t i)
{
    return charts[i];
}
